package com.hc.demo.service;

import com.hc.demo.domain.Orders;
import com.hc.demo.dto.ResultResponse;
import org.springframework.transaction.annotation.Transactional;

public interface OrdersService {
    @Transactional
        //开启事务的注解，确保整个操作符合事务的四个特征：原子性 一致性  持久性 隔离性
    ResultResponse createOrders(Orders orders);

    ResultResponse queryOrderByUserId(String userId);

    ResultResponse queryOrderByUserIdAndState(Orders orders);

    // 取消订单的方法
    ResultResponse cancelAppointment(Integer orderId);


}
